package com.k8.common.executor;

public class Promise<T> {
    private T value;
    private Throwable exception;


    public Promise(T value) {
        this.value = value;
    }

    public Promise(Throwable exception) {
        this.exception = exception;
    }

    public Promise(T value, Throwable exception) {
        this.value = value;
        this.exception = exception;
    }

    public Promise() {
    }

    public void setValue(T value) {
        this.value = value;
    }

    public void setException(Throwable exception) {
        this.exception = exception;
    }

    public T getValue() {
        return value;
    }

    public Throwable getException() {
        return exception;
    }
}
